package com.zalyyh.advertisement.enty

import android.app.Activity
import android.view.View
import com.bytedance.sdk.openadsdk.TTAdConstant
import com.bytedance.sdk.openadsdk.TTFullScreenVideoAd
import com.bytedance.sdk.openadsdk.TTRewardVideoAd

class AdaveData {
    var view: View? = null
        set(value) {
            field = value
            value!!.post(Runnable {
                view_wide = value.getWidth()
                view_high = value.getHeight()

            });
        }
    var wide: Float = 0f
    var high: Float = 0f
    var view_wide: Int = 0
    var view_high: Int = 0
    var codeId: String = ""
    var rewardVideoAd: TTRewardVideoAd? = null
    var mttFullVideoAd: TTFullScreenVideoAd? = null

    fun showRewardVideoAd(a: Activity) {
        if (rewardVideoAd != null) {
            rewardVideoAd!!.showRewardVideoAd(
                a,
                TTAdConstant.RitScenes.CUSTOMIZE_SCENES,
                "scenes_test"
            )

        }
    }

    fun showFullScreenVideoAd(a: Activity) {
        if (mttFullVideoAd != null) {
            mttFullVideoAd!!.showFullScreenVideoAd(a)
        }
    }
}